/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Entiti;

/**
 * 
 * @author Jeanot Nahasan
 * me@jeanotnahasan.com
 * http://www.jeanotnahasan.com
 */
public class Member {
    private String idMember;
    private String namaMember;
    private String noHp;
    private String alamatMember;
    private String alamatEmail;

    /**
     * @return the idMember
     */
    public String getIdMember() {
        return idMember;
    }

    /**
     * @param idMember the idMember to set
     */
    public void setIdMember(String idMember) {
        this.idMember = idMember;
    }

    /**
     * @return the namaMember
     */
    public String getNamaMember() {
        return namaMember;
    }

    /**
     * @param namaMember the namaMember to set
     */
    public void setNamaMember(String namaMember) {
        this.namaMember = namaMember;
    }

    /**
     * @return the noHp
     */
    public String getNoHp() {
        return noHp;
    }

    /**
     * @param noHp the noHp to set
     */
    public void setNoHp(String noHp) {
        this.noHp = noHp;
    }

    /**
     * @return the alamatMember
     */
    public String getAlamatMember() {
        return alamatMember;
    }

    /**
     * @param alamatMember the alamatMember to set
     */
    public void setAlamatMember(String alamatMember) {
        this.alamatMember = alamatMember;
    }

    /**
     * @return the alamatEmail
     */
    public String getAlamatEmail() {
        return alamatEmail;
    }

    /**
     * @param alamatEmail the alamatEmail to set
     */
    public void setAlamatEmail(String alamatEmail) {
        this.alamatEmail = alamatEmail;
    }
    
    public boolean isNamaValid(String nama) {
        if (nama.length() > 3 && nama.matches("[a-zA-Z ]*")) {
            return true;
        } else return false;
        
    }
  
    public boolean isNoHpMemberValid(String noHp) {
        if (noHp.length() > 7 && noHp.matches("[0-9]*") && noHp.length() < 13) {
            return true;
        } else return false;
    }
    public boolean isEmailMemberValid(String email) {
        if (email.length() > 3 && email.matches("[a-zA-Z-_.0-9]+(@)[a-zA-Z0-9]+([.])[a-zA-Z.-]+")) {
            return true;
        } else return false;
    }
    
}
